﻿namespace MvvmFx.Common.ViewModels.Commands
{
    /// <summary>
    /// Base ViewModelCommandAsync is a generic class that inherits from 
    /// <see cref="ViewModelCommand"/> and allows ViewModel-level 
    /// functionality to execute asynchronusly when the commmand is executed.
    /// </summary>
    /// <typeparam name="TViewModel">The type of the  view model associated to the command.</typeparam>
    public partial class ViewModelCommandAsync<TViewModel>
    {
        private void DisposeBackgroundWorker()
        {
            // Dispose of the BackgroundWorker in WPF
            _worker.Dispose();
        }
    }
}